<div style="height: 222px">
    <div id="apply-bar" style="width: 100%;height:100%;">加载中....</div>
</div>
<script>
    $(function () {
        var chartJs = echarts.init(document.getElementById('apply-bar'),null,{renderer: 'canvas'});
        chartJs.setOption({
            // title: {
            //     text: "申请统计",
            //     left: 'left'
            // },
            tooltip: {
                trigger: 'item',
                formatter: '{b} : {c} ({d}%)',
            },
            legend: {
                orient: 'vertical',
                left: 'left',
                data: []
            },
            series: [
                {
                    type: 'pie',
                    radius: '70%',
                    label: {
                        formatter: '{b}: {c} ({d}%)'
                    },
                    data: [
                            @foreach($data as $k=>$v)
                        {value: '{{$v}}', name: '{{$k}}'},
                        @endforeach
                    ]
                }
            ]
        });
    });
</script>